import { createApp } from 'vue'
// import './style.css'
// import "./styles/index.scss";
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'




import router from './router'; // 引入路由模块
import { createPinia } from 'pinia'
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-icons/font/bootstrap-icons.css';
import 'bootstrap';
import 'highlight.js/styles/github.css';
const pinia = createPinia()

// 监听代码块的复制按钮点击事件
window.handleCopyToClipboard = function (event) {
  const codeElement = event.target.closest('.markdown-code-block')?.querySelector('code');
  const text = codeElement ? codeElement.innerText : '';
  navigator.clipboard.writeText(text)
    .then(() => alert('已复制到剪贴板'))
    .catch(err => console.error('复制失败:', err));
};

createApp(App).use(ElementPlus).use(pinia).use(router).mount('#app')
